using System;
using System.Collections.Generic;
using System.Text;
using EnvDTE;
using EnvDTE80;

namespace Koda.Model
{
    public class CodeElementComparer : IComparer<CodeElement2>
    {
        private MemberComparer memberComparer;

        public CodeElementComparer()
        {
            this.memberComparer = new MemberComparer();
        }

        public int Compare(CodeElement2 x, CodeElement2 y)
        {
            Member memberX = Member.FromCodeElement(x);
            Member memberY = Member.FromCodeElement(y);

            return this.memberComparer.Compare(memberX, memberY);
        }
    }
}
